package com.weixiaodong.ModelDesign.适应设计模式.Adapter模式.适配器模式演示案例.使用委托的适配器;

import com.weixiaodong.ModelDesign.适应设计模式.Adapter模式.适配器模式演示案例.使用继承的适配器.Banner;

public class PrintBanner extends Print {

    private Banner banner; // 委托的对象，通过这个委托对象实现


    public PrintBanner(Banner banner) {
        this.banner = banner;
    }

    @Override
    public void PrintWeek() {
        this.banner.ShowBannerWithParen();
    }

    @Override
    public void PrintStrong() {
        this.banner.ShowBannerWithAster();
    }
}
